Coq à la Tarski: a predicative calculus of constructions with explicit subtyping
نویسندگان
چکیده
The predicative Calculus of Inductive Constructions (pCIC), the theory behind the Coq proof system, contains an infinite hierarchy of predicative universes T ype 0 ∈ T ype 1 ∈ T ype 2 ∈. .. and an impredicative universe P rop for propositions, together with an implicit cumulativity relation P rop ⊆ T ype 0 ⊆ T ype 1 ⊆ T ype 2 ⊆. .. . Subtyping in Coq is implicit, and is handled by the kernel. An attempt to simplify the theory would be to make subtyping explicit, by inserting explicit coercions such as c 0,1 : T ype 0 → T ype 1 and rely on a kernel that only uses the classic conversion rule Γ M : A A ≡ B Γ M : B. However, because of dependent types, coercions change the shape of the types and therefore interfere with type checking. We present a formulation of the predicative calculus of constructions using Tarski-style universes [4] where subtyping is explicit. Other such systems have been proposed in the past [5, 2, 3]. However, they do not preserve equality: a term in the original Coq system can have many non-equivalent representations in the new system, which breaks typing. As a result, these systems lose some of the expressivity of Russell-style universes with implicit subtyping, and are therefore incomplete. Our system fully preserves equality. By adding aditional equations between terms, we ensure that every well-typed term in the original system has a unique canonical representation in our system. To our knowledge, this is the first time such work has been done for the full predicative calculus of constructions. We will also show how to orient the equations into reduction rules. This work can be used as a basis for embedding Coq in a logical framework like the λΠ-calculus modulo [1], implemented in Dedukti [6].
منابع مشابه
A Calculus of Constructions with Explicit Subtyping
The calculus of constructions can be extended with an infinite hierarchy of universes and cumulative subtyping. Subtyping is usually left implicit in the typing rules. We present an alternative version of the calculus of constructions where subtyping is explicit. We avoid problems related to coercions and dependent types by using the Tarski style of universes and by adding equations to reflect ...
متن کاملConsistency of the Predicative Calculus of Cumulative Inductive Constructions (pCuIC)
In order to avoid well-know paradoxes associated with self-referential definitions, higher-order dependent type theories stratify the theory using a countably infinite hierarchy of universes (also known as sorts), Type0 : Type1 : · · · . Such type systems are called cumulative if for any type A we have that A : Typei implies A : Typei+1. The predicative calculus of inductive constructions (pCIC...
متن کاملCumulative Inductive Types In Coq
In order to avoid well-know paradoxes associated with self-referential definitions, higher-order dependent type theories stratify the theory using a countably infinite hierarchy of universes (also known as sorts), Type0 : Type1 : · · · . Such type systems are called cumulative if for any type A we have that A : Typei implies A : Typei+1. The Predicative Calculus of Inductive Constructions (pCIC...
متن کاملConstructor Subtyping in the Calculus of Inductive Constructions
The Calculus of Inductive Constructions (CIC) is a powerful type system, featuring dependent types and inductive deenitions, that forms the basis of proof-assistant systems such as Coq and Lego. We extend CIC with constructor subtyping, a basic form of subtyping in which an inductive type is viewed as a subtype of another inductive type if has more elements than. It is shown that the calculus i...
متن کاملFirst Steps Towards Cumulative Inductive Types in CIC
We discuss our on-going research on making inductive types cumulative in the predicative calculus of inductive constructions (pCIC) – the logic of the Coq proof assistant. Having inductive types be cumulative alleviates some problems that occur while working with large inductive types, e.g., the category of small categories, in pCIC. We present the pCuIC system which adds cumulativity for induc...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014